arithmetic and geometric sequences